<!DOCTYPE html>
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<link rel="stylesheet" type="text/css" href="{{CDN}}/easyui/themes/default/easyui.css">
		<link rel="stylesheet" type="text/css" href="{{CDN}}/easyui/themes/icon.css">
		<script type="text/javascript" src="{{CDN}}/easyui/jquery.min.js"></script>
		<script type="text/javascript" src="{{CDN}}/easyui/jquery.easyui.min.js"></script>
		<script type="text/javascript" src="{{CDN}}/easyui/locale/easyui-lang-zh_CN.js"></script>
		<script>
		$(function(){
					
			/*表格初始化*/
			$("#grid").datagrid({
				singleSelect:true,
				fit:true,
				//fitColumns:true,
				collapsible:true, 
				//width:'auto',
				striped:true,
				rownumbers:true, 
			    columns:[[    
			    	{field:'CK',checkbox:true},
			        {field:'person_id',title:'企业人员名称',width:400,align:'left'},
			        {field:'is_del',title:'is_del',width:50,align:'center'},
			        {field:'qualifi_type',title:'qualifi_type',width:150,align:'right'},
			        {field:'qualifi_name',title:'qualifi_name',width:250,align:'right'},
			        {field:'qualifi_major',title:'qualifi_major',width:200,align:'right'},
			        {field:'level_name',title:'证书等级',width:150,align:'right'},
			        {field:'cert_num',title:'证书编号',width:300,align:'right'},
			        {field:'registered_num',title:'注册证号',width:200,align:'right'},
			        {field:'issued_date',title:'发证日期',width:100,align:'right'},
			        {field:'issued_by',title:'发证机关',width:300,align:'right'},
			        {field:'expiry_start',title:'有效日期起',width:100,align:'right'},
			        {field:'expiry_end',title:'有效日期止',width:200,align:'right'},
			        {field:'data_source_code',title:'数据来源',width:150,align:'center'}
			    ]],
			    pagination:true,
			    pageSize:20,
			    pageList:[10,20,30,50,100,200,500]
			});
			
			
			//下拉框加载数据,
			//数据来源
			$('#search_data_source').combobox({    
			    url:'/common/dict/getComboboxDataSourceDict',    
			    valueField:'code',
			    width:400,
			    textField:'name',
			    filter: function(q, row){
					var opts = $(this).combobox('options');
					return row[opts.textField].indexOf(q) >= 0;
				}
			});
			$('#search_data_source').combobox('setValue','sichuan')
			

            $('#search_cert_dict_id').combobox({    
			    url:'/common/dict/getComboboxPersonCertDict',    
			    valueField:'code',
			    width:400,
			    textField:'name',
			    filter: function(q, row){
					var opts = $(this).combobox('options');
					return row[opts.textField].indexOf(q) >= 0;
				}
			});
			
			//查询按钮
			$("#search_btn").click(function(){
				$("#grid").datagrid({
					url:'/middleLib/personCert/getPersonCertList',
					method:"POST",
					queryParams: parent.getFormJson($("#search_form"))
				});
			});
			
			//打开链接
			$("#open_url_btn").click(function(){
				var rows = $('#grid').datagrid('getSelections');
				if(rows.length<1){
					$.messager.alert('提示','请勾选一条');
					return false;
				}
				var url = rows[0].url;
				window.open(url);
			});
		});
		
		</script>
	</head>
	<body class="easyui-layout">
		<!-- 查询条件表单 -->
		<div id = "toolbar" >
			<form id ="search_form" method="post" class="easyui-form">
				<table width="100%">
					<tr align = "left">
						<td align="right" width="10%">数据来源:</td>
						<td width="30%"  align="left">
							<input  class="easyui-combobox" id = "search_data_source"  panelHeight='auto' name="data_source_code" style="width:400px" />
						</td>
						<td align="right" width="10%">证书类别:</td>
						<td width="30%"  align="left">
							<input class="easyui-textbox" id="search_cert_dict_id"  name="cert_dict_id" style="width:400px" />
						</td>
						<td width="20%" ></td>
					</tr>
					<tr>

						<td align="right" width="20%">企业人员名称:</td>
						<td width="20%"  align="left" >
							<input class="easyui-textbox"  name="person_id" style="width:400px"  />
						</td>
						<td width="15%" ></td>
					</tr>
				</table>
			</form>
			<a href="#" id="search_btn" class="easyui-linkbutton"	 data-options="iconCls:'icon-search'"  >查询</a>
			<a href="#" id='open_url_btn' class="easyui-linkbutton" data-options="iconCls:'icon-reload'">打开链接页面</a>
		</div>
		
		<!-- 主表格 -->
		<div region="center" border="false">
			<table id="grid" toolbar="#toolbar" ></table>
		</div>
	</body>
</html>
